package com.szrt.day20170405.ch04;

public class ForDemo03 {
	
	
	public static void main(String[] args) {
		
		
		//打菱形的上半部分
		for(int hang=1; hang<=4;hang++){
			//1 打空格
			for(int kongge=1;kongge<=4-hang;kongge++){
				System.out.print(" ");
			}
			
			//2 打星星
			for(int xingxing =1 ; xingxing <=2*hang-1;xingxing++){
				System.out.print("*");
			}
			
			//3 打换行
			System.out.println();
		}
		
		
		//打菱形的下半部分
		for(int hang=1; hang<=3;hang++){
			//1 打空格
			for(int kongge=1;kongge<=hang;kongge++){
				System.out.print(" ");
			}
			
			//2 打星星
			for(int xingxing =1 ; xingxing <=-2*hang+7;xingxing++){
				System.out.print("*");
			}
			
			//3 打换行
			System.out.println();
		}
	}

}
